<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">

<title>登录</title>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/jquery-easyui-1.3.3/jquery.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/jquery-easyui-1.3.3/jquery.easyui.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/jquery-easyui-1.3.3/locale/easyui-lang-zh_CN.js"></script>

<script type="text/javascript">
	
	function checkForm() {
		
		var userName = $("#userName").val();                                 
		var password = $("#password").val();
		if (userName == null || userName == "") {
			$("#error").html("用户名不能未空！");
			return false;
		}
		if (password == null || password == "") {
			$("#error").html("密码不能未空！");
			return false;
		}
		return true;
	}
</script>

</head>
<body>
	<div>
		<form action="${pageContext.request.contextPath}/blogger/login.do" method="post" onsubmit="return checkForm()">
			<span>用户登录</span>
			<div>
				<input id="userName" name="userName" type="text" placeholder="用户名" value="${blogger.userName}">
			</div>
			<div>
				<input id="password" name="password" type="password" placeholder="密　码" value="${blogger.password}">
			</div>
			<div>
				<span class="text"><a href="${pageContext.request.contextPath}/index.html">个人博客系统</a></span>
				
				<input type="submit" value="登录"/>
				<span><font color="red" id="error">${errorInfo}</font></span>
			</div>
		</form>
	</div>
</body>
</html>